package edu.lmu.cs.dhara.roflkode.entities;

import java.util.Collections;
import java.util.List;

import edu.lmu.cs.dhara.util.Log;

/**
 * The roflkode WERD...MEBBE...NO WAI statement.
 */
public class ConditionalStatement extends Statement {
    private List<Case> cases;

    /**
     * Create an if statement with a complete list of cases.
     */
    public ConditionalStatement(List<Case> cases) {
        this.cases = cases;
    }

    /**
     * Create an if statement that has only a single case (no else
     * or else if parts).
     */
//    public ConditionalStatement(Case c) {
//        this.cases = Collections.singletonList(c);
//    }

    /**
     * Returns the cases.
     */
    public List<Case> getCases() {
        return cases;
    }

    /**
     * Analyzes the if-statement (by analyzing each case).
     */
    public void analyze(Log log, SymbolTable table, Function f, boolean inLoop) {
//        for (Case c: cases) {
//            c.analyze(log, table, f, inLoop);
//        }
    }
}
